package com.snow.auth.entity;

import com.snow.jpa.IBaseEntity;
import com.snow.jpa.ICreateInfoEntity;
import com.snow.jpa.ITenantEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

@Getter
@Setter
@Entity
public class SystemRole implements Serializable, IBaseEntity<Integer>, ITenantEntity, ICreateInfoEntity {

    /**
     * 角色id
     */
    @Id
    @GeneratedValue(strategy = IDENTITY)
    private Integer id;
    /**
     * 角色名称
     */
    @NotEmpty(message = "角色名称不能为空")
    private String name;
    /**
     * 角色备注
     */
    private String remark;
    /**
     * 菜单信息，用于前台反显
     */
    @NotEmpty(message = "角色权限信息不能为空")
    private String permissions;
    private Integer createId;
    private String createName;
    private Date createTime;
    private Integer tenantId;


}
